package com.usabb.pojo.vo;


import com.usabb.domain.CombosCategoryDO;
import com.usabb.domain.MaternityCombosDO;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * 套餐管理页面, 新增
 */

@Slf4j
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
@ToString
public class CombosAddVO {

    private Long baseId;
    private String combosName;
    private String combosFee;

    private List<String> category;
    private String categoryTrCount; //大类下 tr 计数


    private List<String> itemNo;
    private List<String> itemName;
    private List<String> itemRemark;
    /** 1v1 */
    private List<String> itemIntro;


    /**
     * CombosAddVO(
     *      baseId=1170203922640953345,
     *      combosName=黄金套餐,
     *      combosFee=400000,
     *      category=[安心服务保障, 高端住宿],
     *      categoryTrCount=3,,
     *      itemNo=[1.1, 1.2, 2.1, 2.2, 2.3],
     *      itemName=[项目1.1, 项目1.2, 项目2.1, 项目2.2, 项目23],
     *      itemRemark=[备注1.1, 备注1.2, 备注2.1, 备注2.2, 备注23],
     *      itemIntro=[1v1, 1v2, 2v1, 2v2, 2v3]
     * )
     */
    public static final String DELIMITER = ",";
    public static MaternityCombosDO transform(CombosAddVO addVO) {
        MaternityCombosDO combosDO = MaternityCombosDO.ofBase(addVO);
        combosDO.setCategoryDOS(CombosCategoryDO.from(addVO));

        return combosDO;
//        Combos combos = Combos.ofBase(addVO);
//        combos.setCategories(CombosCategory.from(addVO));
//        return combos;
    }










}
